c****HP    first line
c     program mire(para)
c****SG    first line
      program mire
      character *140 para
      character *140  mess
      character ima(1024*1024)
      integer sizex,sizey
      logical redr,greenr,bluer
C
      print*,"external program example: mire"
c**** SG external parameter
      call getarg(1,para)
c
      call sphinx_get_para
     *(sizex,sizey,redr,greenr,bluer,para,mess)
      print*,"image size:",sizex,sizey
      print*,"input output banks:",redr,greenr,bluer
      print*,"message zone:",mess(1:30)
C
      do 1 i=1,sizey
      iad=(i-1)*sizex
      n=0
      do 1 j=1,sizex
      iad=iad+1
      n=n+1
      if(n.gt.255)n=0
      ima(iad)=char(n)
    1 continue
C
      call sphinx_write(para,ima,ima,ima)
      stop
      end
